<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>判断早中晚时间</title>
    <style>
        a{
            color: #c01900;
            text-decoration: none;
        }
    </style>
</head>
<body>
<a href="判断星期.html">判断星期</a>
<br/>
<br/>
<!--<input type="button" value="点击"onclick="time(prompt('请输入时间：'));">-->
<script>
    var time=prompt("请输入时间：");
    // function time() {
        if (time>6&&time<13){
            document.write("早上好！！！")
            document.write("<img src=\"smile.gif\">");
        }else if(time>12&&time<20){
            document.write("中午好！！！")
            document.write("<img src=\"aftermoon.gif\">");

        }else{
            document.write("晚上好！！！")
            document.write("<img src=\"moon.gif\">");
        }
    // }
</script>


</body>
</html>